โ– humdrum codex / sportsball
license AGPL-3.0
2.9 KB raw
id
TASK-017
title
Full team schedules
status
๐Ÿ Done
assignee
@humdrum-tiv
created_date
2026-06-17 17:43
updated_date
2026-06-18 01:17
labels
feature
dependencies
priority
medium
ordinal
17000

Description

Show a team's complete season schedule (past results + upcoming fixtures) beyond the polled fetch window, via ESPN's team-schedule endpoint. Reachable from a team (e.g. from the detail view or a favorite). Generalizes TASK-009 (favorite last/next beyond window) โ€” the schedule endpoint backs both.

Acceptance Criteria

Implementation Plan

  1. model.TeamSchedule{Team,Season,Games []model.Game} (reuse Game).
  2. espn.Client.TeamSchedule(ctx,l,teamID): GET teams/{id}/schedule; events[] like scoreboard BUT score is object {value,displayValue} -> schedule-specific competitor decode; reuse mapState/parseTime. Refactor mapTeam to share teamFromJSON.
  3. UI viewSchedule: opened via g=away / G=home from a dashboard game card or detail view, and via enter on a standings row. Past results (score + W/L tint) + upcoming, scroll-clamped. esc returns to prior view.
  4. Closes/supersedes TASK-009 (favorite last/next) via same endpoint.

Final Summary

Added a full team-schedule view (viewSchedule).

What:

Supersedes TASK-009 (favorite last/next beyond the fetch window) โ€” same endpoint.

Tests: mapScheduleGame (object score, home/away, winner, state) and the no-competition (bye) skip. Live-smoke verified a 163-game MLB schedule maps with scores. go vet + go test ./... pass.